{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Epistemic regression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "\n",
    "import numpy as np\n",
    "import torch\n",
    "import math\n",
    "import matplotlib.pyplot as plt\n",
    "import imageio\n",
    "\n",
    "import torch\n",
    "import torch.nn as nn\n",
    "import torch.nn.functional as F\n",
    "import torch.optim as optim\n",
    "from torchvision import datasets, transforms\n",
    "from torchvision.utils import make_grid\n",
    "from tqdm import tqdm, trange\n",
    "\n",
    "import seaborn as sns\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Helper functions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "def normalize(image):\n",
    "    \"\"\"Takes a tensor of 3 dimensions (height, width, colors) and normalizes it's values\n",
    "    to be between 0 and 1 so it's suitable for displaying as an image.\"\"\"\n",
    "    image = image.astype(np.float32)\n",
    "    return (image - image.min()) / (image.max() - image.min() + 1e-5)\n",
    "\n",
    "\n",
    "def display_images(images, titles=None, cols=5, interpolation=None, cmap=\"Greys_r\"):\n",
    "    \"\"\"\n",
    "    images: A list of images. I can be either:\n",
    "        - A list of Numpy arrays. Each array represents an image.\n",
    "        - A list of lists of Numpy arrays. In this case, the images in\n",
    "          the inner lists are concatentated to make one image.\n",
    "    \"\"\"\n",
    "    titles = titles or [\"\"] * len(images)\n",
    "    rows = math.ceil(len(images) / cols)\n",
    "    height_ratio = 1.2 * (rows/cols) * (0.5 if type(images[0]) is not np.ndarray else 1)\n",
    "    plt.figure(figsize=(15, 15 * height_ratio), dpi=200)\n",
    "    i = 1\n",
    "    for image, title in zip(images, titles):\n",
    "        plt.subplot(rows, cols, i)\n",
    "        plt.axis(\"off\")\n",
    "        # Is image a list? If so, merge them into one image.\n",
    "        if type(image) is not np.ndarray:\n",
    "            image = [normalize(g) for g in image]\n",
    "            image = np.concatenate(image, axis=1)\n",
    "        else:\n",
    "            image = normalize(image)\n",
    "        plt.title(title, fontsize=12)\n",
    "        plt.imshow(image, cmap=cmap, interpolation=interpolation)\n",
    "        i += 1\n",
    "\n",
    "        \n",
    "def show(img,cmap='viridis'):\n",
    "    npimg = img.numpy()\n",
    "    plt.imshow(np.transpose(npimg, (1,2,0)), interpolation='nearest', cmap=cmap)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "def uncertainity_estimate_2d(X, model, iters, l2, dropout_p=0.5, decay=1e-6):\n",
    "    outputs = [model(X).cpu().data for i in range(iters)]\n",
    "    outputs = torch.stack(outputs)\n",
    "    y_mean = outputs.mean(dim=0)\n",
    "    y_variance = outputs.var(dim=0)\n",
    "    tau = l2 * (1. - dropout_p) / (2. * iters * decay)\n",
    "    y_variance += (1. / tau)\n",
    "    y_std = np.sqrt(y_variance)\n",
    "    return y_mean, y_std\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "DEVICE = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n",
    "LOADER_KWARGS = {'num_workers': 1, 'pin_memory': True} if torch.cuda.is_available() else {}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "BATCH_SIZE = 128\n",
    "TEST_BATCH_SIZE = 5\n",
    "\n",
    "train_loader = torch.utils.data.DataLoader(\n",
    "    datasets.MNIST(\n",
    "        './mnist', train=True, download=True,\n",
    "        transform=transforms.ToTensor()),\n",
    "    batch_size=BATCH_SIZE, shuffle=True, **LOADER_KWARGS)\n",
    "test_loader = torch.utils.data.DataLoader(\n",
    "    datasets.MNIST(\n",
    "        './mnist', train=False, download=True,\n",
    "        transform=transforms.ToTensor()),\n",
    "    batch_size=TEST_BATCH_SIZE, shuffle=False, **LOADER_KWARGS)\n",
    "\n",
    "\n",
    "TRAIN_SIZE = len(train_loader.dataset)\n",
    "TEST_SIZE = len(test_loader.dataset)\n",
    "NUM_BATCHES = len(train_loader)\n",
    "NUM_TEST_BATCHES = len(test_loader)\n",
    "\n",
    "CLASSES = 10\n",
    "TRAIN_EPOCHS = 10 #20\n",
    "SAMPLES = 2\n",
    "TEST_SAMPLES = 10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "class AutoEncoderEpistemic(nn.Module):\n",
    "    def __init__(self, p=0.5):\n",
    "        self.dropout_p = p\n",
    "        super(AutoEncoderEpistemic, self).__init__()\n",
    "        self.encoder = nn.Sequential(\n",
    "            nn.Linear(28 * 28, 128),\n",
    "            nn.ReLU(True),\n",
    "            nn.Linear(128, 64),\n",
    "            nn.ReLU(True), \n",
    "            nn.Linear(64, 12), \n",
    "            nn.ReLU(True), \n",
    "            nn.Linear(12, 3))\n",
    "        \n",
    "        self.decoder = nn.Sequential(\n",
    "            nn.Linear(3, 12),\n",
    "            nn.ReLU(True),\n",
    "            nn.Dropout(p=self.dropout_p),\n",
    "            nn.Linear(12, 64),\n",
    "            nn.ReLU(True),\n",
    "            nn.Dropout(p=self.dropout_p),\n",
    "            nn.Linear(64, 128),\n",
    "            nn.ReLU(True), \n",
    "            nn.Dropout(p=self.dropout_p),\n",
    "            nn.Linear(128, 28 * 28), \n",
    "            nn.Tanh())\n",
    "\n",
    "    def forward(self, x):\n",
    "        x = x.view(-1, 28*28)\n",
    "        x = self.encoder(x)\n",
    "        x = self.decoder(x)\n",
    "        return x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "model = AutoEncoderEpistemic(p=0.1).to(DEVICE)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "def train_autoencoder(model, optimizer, criterion, epoch):\n",
    "    model.train()\n",
    "    for batch_idx, (data, target) in enumerate(tqdm(train_loader)):\n",
    "#     for batch_idx, (data, target) in enumerate(train_loader):\n",
    "        data = data.view(data.size(0), -1)\n",
    "        data, target = data.to(DEVICE), target.to(DEVICE)\n",
    "        model.zero_grad()\n",
    "        out = model(data)\n",
    "        loss = criterion(out, data)\n",
    "        loss.backward()\n",
    "        optimizer.step()\n",
    "     \n",
    "    print('epoch [{}], loss:{:.4f}'.format(epoch, loss.data.item()))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 469/469 [01:08<00:00,  4.98it/s]\n",
      "  0%|          | 0/469 [00:00<?, ?it/s]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "epoch [0], loss:0.0530\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 469/469 [01:10<00:00,  6.33it/s]\n",
      "  0%|          | 0/469 [00:00<?, ?it/s]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "epoch [1], loss:0.0450\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "  4%|▍         | 18/469 [00:02<01:00,  7.47it/s]\n"
     ]
    },
    {
     "ename": "KeyboardInterrupt",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mKeyboardInterrupt\u001b[0m                         Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-14-69f69f56033e>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      5\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mepoch\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mTRAIN_EPOCHS\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m     \u001b[0mtrain_autoencoder\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moptimizer\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcriterion\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mepoch\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m<ipython-input-13-56b3975ffd5d>\u001b[0m in \u001b[0;36mtrain_autoencoder\u001b[0;34m(model, optimizer, criterion, epoch)\u001b[0m\n\u001b[1;32m      8\u001b[0m         \u001b[0mout\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      9\u001b[0m         \u001b[0mloss\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcriterion\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mout\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 10\u001b[0;31m         \u001b[0mloss\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbackward\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     11\u001b[0m         \u001b[0moptimizer\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstep\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     12\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/miniconda/lib/python3.7/site-packages/torch/tensor.py\u001b[0m in \u001b[0;36mbackward\u001b[0;34m(self, gradient, retain_graph, create_graph)\u001b[0m\n\u001b[1;32m    105\u001b[0m                 \u001b[0mproducts\u001b[0m\u001b[0;34m.\u001b[0m \u001b[0mDefaults\u001b[0m \u001b[0mto\u001b[0m\u001b[0;31m \u001b[0m\u001b[0;31m`\u001b[0m\u001b[0;31m`\u001b[0m\u001b[0;32mFalse\u001b[0m\u001b[0;31m`\u001b[0m\u001b[0;31m`\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    106\u001b[0m         \"\"\"\n\u001b[0;32m--> 107\u001b[0;31m         \u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mautograd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbackward\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgradient\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mretain_graph\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcreate_graph\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    108\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    109\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0mregister_hook\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mhook\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/miniconda/lib/python3.7/site-packages/torch/autograd/__init__.py\u001b[0m in \u001b[0;36mbackward\u001b[0;34m(tensors, grad_tensors, retain_graph, create_graph, grad_variables)\u001b[0m\n\u001b[1;32m     91\u001b[0m     Variable._execution_engine.run_backward(\n\u001b[1;32m     92\u001b[0m         \u001b[0mtensors\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgrad_tensors\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mretain_graph\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcreate_graph\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 93\u001b[0;31m         allow_unreachable=True)  # allow_unreachable flag\n\u001b[0m\u001b[1;32m     94\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     95\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mKeyboardInterrupt\u001b[0m: "
     ]
    }
   ],
   "source": [
    "TRAIN_EPOCHS = 5 #20\n",
    "criterion = torch.nn.MSELoss()\n",
    "optimizer = torch.optim.Adam(model.parameters(), lr=1e-3)\n",
    "\n",
    "for epoch in range(TRAIN_EPOCHS):\n",
    "    train_autoencoder(model, optimizer, criterion, epoch)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tensor([7, 2, 1, 0, 4])\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAABoCAYAAADo66t9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAARkklEQVR4nO3deZAUZZrH8e8zoIAaqyKiiITguYMnoAjeiqOgAooHeOx6hRiGByMqguh666xuyHigLu4oHoS6IjqABxgwXiEisMohiIMOCgqDivcRir77R+VTld1d3fRRVZnZ/D4RRFe9mV318FL18uSb72EhBEREJHt+l3QAIiLSOGrARUQySg24iEhGqQEXEckoNeAiIhmlBlxEJKOa1ICbWV8zW2pmy8xsZKmCEhGR9bPGjgM3sxbA+8AfgJXAHODUEMLi0oUnIiK1admE3+0JLAshfAhgZk8AA4FaG3Az06whEZGG+zyEsHX1wqZ0oXQEVsSer4zKqjCzoWY218zmNuG9REQ2ZB8VK2xKBm5Fympk2CGEccA4UAYuIlJKTcnAVwKdYs+3Bz5tWjgiIlJfTWnA5wC7mFkXM9sYGAJMLk1YIiKyPo3uQgkhrDOzi4BpQAvgwRDCuyWLTERE6tToYYSNejP1gYuINMa8EMK+1Qs1E1NEJKPUgIuIZJQacBGRjFIDLiKSUU2ZyCMZcPnllwPQpk0bAPbaay8ATjrppBrn3nfffQDMmjULgEcffbQSIYpIIykDFxHJKA0jbIaefPLJ/ONimfb6fPDBBwAceeSRAHz88celCSxjdt11VwDee+89AIYNG5Y/dvfddycSU6ltuummANx+++35svPPPx+AefPmAXDyyScD8NFHRZfjkMrQMEIRkeZEDbiISEbpJmYz4l0ndXWbeHfAtGnTANhxxx3zx/r37w/ATjvtBMAZZ5wBwC233FL6YDOgW7duAPz2228AfPLJJ0mGUxbbbbcdAOedd16+zP++PXr0AOC4444DYOzYsRWOrny6d+8OwKRJkwDo3Llzk17vqKOOAmDJkiUArFixoq7TS0YZuIhIRikDbwb23Td3b+OEE06ocezdd3Priw0YMACAzz//HIDvvvsOgI033jh/7ptvvgnA3nvvDUDbtm3LFHE27LPPPgB8//33QCFbaw623jq3ucv48eOTDSQhRx99NACtWrUqyev59+ucc84BYMiQISV53fVRBi4iklGZzMC9j9f77T79NLePxE8//QTAhAkT8ueuXr0agGXLllUyxIrq0KEDAGa5TZI864ZCprFq1aqiv+sTfQC6du1a5dhzzz1X0jizYs899wTg4osvBuCRRx5JMpySuuSSSwA4/vjjAejZs+d6f+eQQw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BJ0WnpSZegBDCamCFme0WFfUBFpPSOibXddLLzDaJPh8eb2rrOFJbfU4G/j0aLdEL+Nq7WpJkZn2BK4EBIYQfYocmA0PMrJWZdSF3c/CtJGJ0IYSFIYT2IYTO0XdvJdA9+mxXvn4reCPgGHJ3mD8ARlf6RkQ94juI3OXOAuCd6M8x5PqVZwB/j362TTrWIrEfBkyNHu9I7kO+DHgKaJV0fNVi3QeYG9Xzs8CWaa5j4HrgPWAR8CjQKk11DDxOrn/+F3KNybm11Se5S/yx0XdwIbnRNWmIdxm5vmP/3t0fO390FO9SoF8a4q12fDmFm5gVr19NpRcRySjNxBQRySg14CIiGaUGXEQko9SAi4hklBpwEZGMUgMuIpJRasBFRDLq/wGo1bU3hs1Y6QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "mnist_sample, mnist_target = iter(test_loader).next()\n",
    "mnist_sample = mnist_sample.to(DEVICE)\n",
    "print(mnist_target)\n",
    "# sns.set_style(\"dark\")\n",
    "show(make_grid(mnist_sample.cpu()))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "torch.Size([5, 1, 28, 28])\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAABoCAYAAADo66t9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAdTElEQVR4nO2dacxtZXXHf4vLJKAyCVwGuQxXRikiIkODp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Ogb8C7gXuBv4d2GuWdAx8hY5//mU6L5OPtemTjon/+e4zeBed7JpZkHcHHd+xnrt/csdf0ZV3K/C+WZA3fP8gTRBz6vrNqfSJRCIxp8iZmIlEIjGnyBd4IpFIzCnyBZ5IJBJzinyBJxKJxJwiX+CJRCIxp8gXeCKRSMwp8gWeSCQSc4r/B/Xj4mcgPyrPAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "out = model(mnist_sample)\n",
    "out = out.detach().cpu()\n",
    "out = out.view(-1, 1, 28,28)\n",
    "print(out.size())\n",
    "show(make_grid(out))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(28, 28)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAACT0AAAL+CAYAAABlzCJfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAewgAAHsIBbtB1PgAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nOzde5RlWV0f8O+vqvo9PT0z9MwAw2MAHQUhgKACIvIQ34IYxSARMEZdEBUJIEKywhjFR4KARBNEiGgIyktxGVCQAIowDDOJuEAeg8DwkGFeDvPuR1Xt/HFvp+801d3V072reld/PmvVWqfu3fe3z32de/Y533NOtdYCAAAAAAAAAAAwirn1ngEAAAAAAAAAAIBjIfQEAAAAAAAAAAAMRegJAAAAAAAAAAAYitATAAAAAAAAAAAwFKEnAAAAAAAAAABgKEJPAAAAAAAAAADAUISeAAAAAAAAAACAoQg9AQAAAAAAAAAAQxF6AgAAAAAAAAAAhiL0BAAAAAAAAAAADEXoCQAAAAAAAAAAGIrQEwAAAAAAAAAAMBShJw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veO35V1bX5vcEZ50L3Wlom3Bu6t+H10PfQfU2qqlr97A5wuDM8a0wwHo/o8auq6n7vHd9a+tWU4wzPMOO5tfuaMWMfwniUBwAAAAAAAAAAooieAAAAAAAAAACAKKInAAAAAAAAAAAgiugJAAAAAAAAAACIInoCAAAAAAAAAACiiJ4AAAAAAAAAAIAooicAAAAAAAAAACCK6AkAAAAAAAAAAIgiegIAAAAAAAAAAKKIngAAAAAAAAAAgCiiJwAAAAAAAAAAIIroCQAAAAAAAAAAiCJ6AgAAAAAAAAAAooieAAAAAAAAAACAKKInAAAAAAAAAAAgiugJAAAAAAAAAACIInoCAAAAAAAAAACiiJ4AAAAAAAAAAIAooicAAAAAAAAAACCK6AkAAAAAAAAAAIgiegIAAAAAAAAAAKKIngAAAAAAAAAAgCiiJwAAAAAAAAAAIMoyxjh6DgAAAAAAAAAAAH/mn54AAAAAAAAAAIAooicAAAAAAAAAACCK6AkAAAAAAAAAAIgiegIAAAAAAAAAAKKIngAAAAAAAAAAgCiiJwAAAAAAAAAAIIroCQAAAAAAAAAAiCJ6AgAAAAAAAAAAooieAAAAAAAAAACAKKInAAAAAAAAAAAgiugJAAAAAAAAAACIInoCAAAAAAAAAACiiJ4AAAAAAAAAAIAooicAAAAAAAAAACCK6AkAAAAAAAAAAIgiegIAAAAAAAAAAKKIngAAAAAAAAAAgCiiJwAAAAAAAAAAIIroCQAAAAAAAAAAiPIDw4/1hpzOAQYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 3000x1200 with 3 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = mnist_sample[1,:,:,:]\n",
    "iters = 50\n",
    "dropout_p=0.1\n",
    "decay=1e-6\n",
    "l2 = 0.01\n",
    "\n",
    "y_mean, y_std = uncertainity_estimate_2d(x, model, iters, l2=l2, dropout_p=dropout_p,decay=decay)\n",
    "\n",
    "res_list = [x.cpu().view(28,28).numpy(), y_mean.view(28,28).numpy(), y_std.view(28,28).numpy()]\n",
    "print(res_list[0].shape)\n",
    "display_images(res_list, titles=['input','mean', 'std'], cols=len(res_list), interpolation=None, cmap=\"viridis\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Out of domain samples"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n",
      "0it [00:00, ?it/s]\u001b[A"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Downloading http://codh.rois.ac.jp/kmnist/dataset/kmnist/train-images-idx3-ubyte.gz to ./kmnist/KMNIST/raw/train-images-idx3-ubyte.gz\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n",
      "  0%|          | 0/18165135 [00:00<?, ?it/s]\u001b[A\n",
      "  0%|          | 16384/18165135 [00:01<04:36, 65702.80it/s]\u001b[A\n",
      "  0%|          | 40960/18165135 [00:01<04:08, 72853.06it/s]\u001b[A\n",
      "  1%|          | 98304/18165135 [00:01<03:17, 91550.08it/s]\u001b[A\n",
      "  1%|          | 204800/18165135 [00:01<02:30, 119660.40it/s]\u001b[A\n",
      "  2%|▏         | 352256/18165135 [00:02<01:53, 157188.28it/s]\u001b[A\n",
      "  3%|▎         | 516096/18165135 [00:02<01:26, 203481.02it/s]\u001b[A\n",
      "  4%|▎         | 671744/18165135 [00:02<01:08, 254864.68it/s]\u001b[A\n",
      "  5%|▍         | 835584/18165135 [00:02<00:55, 311823.28it/s]\u001b[A\n",
      "  6%|▌         | 999424/18165135 [00:03<00:46, 369431.14it/s]\u001b[A\n",
      "  6%|▋         | 1155072/18165135 [00:03<00:40, 420994.49it/s]\u001b[A\n",
      "  7%|▋         | 1318912/18165135 [00:03<00:35, 470600.93it/s]\u001b[A\n",
      "  8%|▊         | 1482752/18165135 [00:03<00:32, 513085.19it/s]\u001b[A\n",
      "  9%|▉         | 1646592/18165135 [00:04<00:30, 547737.61it/s]\u001b[A\n",
      " 10%|▉         | 1802240/18165135 [00:04<00:28, 568781.45it/s]\u001b[A\n",
      " 11%|█         | 1966080/18165135 [00:04<00:27, 590994.71it/s]\u001b[A\n",
      " 12%|█▏        | 2129920/18165135 [00:04<00:26, 607556.69it/s]\u001b[A\n",
      " 13%|█▎        | 2285568/18165135 [00:05<00:25, 612713.85it/s]\u001b[A\n",
      " 13%|█▎        | 2449408/18165135 [00:05<00:25, 623702.51it/s]\u001b[A\n",
      " 14%|█▍        | 2613248/18165135 [00:05<00:24, 630741.42it/s]\u001b[A\n",
      " 15%|█▌        | 2768896/18165135 [00:05<00:24, 627085.52it/s]\u001b[A\n",
      " 16%|█▌        | 2932736/18165135 [00:06<00:24, 634105.22it/s]\u001b[A\n",
      " 17%|█▋        | 3096576/18165135 [00:06<00:23, 639302.15it/s]\u001b[A\n",
      " 18%|█▊        | 3260416/18165135 [00:06<00:23, 641187.91it/s]\u001b[A\n",
      " 19%|█▉        | 3416064/18165135 [00:06<00:23, 637009.28it/s]\u001b[A\n",
      " 20%|█▉        | 3579904/18165135 [00:07<00:22, 641142.53it/s]\u001b[A\n",
      " 21%|██        | 3743744/18165135 [00:07<00:22, 642940.91it/s]\u001b[A\n",
      " 21%|██▏       | 3899392/18165135 [00:07<00:22, 637765.84it/s]\u001b[A\n",
      " 22%|██▏       | 4063232/18165135 [00:07<00:21, 641502.72it/s]\u001b[A\n",
      " 23%|██▎       | 4227072/18165135 [00:08<00:21, 643270.46it/s]\u001b[A\n",
      " 24%|██▍       | 4390912/18165135 [00:08<00:21, 645385.67it/s]\u001b[A\n",
      " 25%|██▌       | 4546560/18165135 [00:08<00:21, 639528.96it/s]\u001b[A\n",
      " 26%|██▌       | 4710400/18165135 [00:08<00:20, 643071.59it/s]\u001b[A\n",
      " 27%|██▋       | 4874240/18165135 [00:09<00:20, 643895.91it/s]\u001b[A\n",
      " 28%|██▊       | 5029888/18165135 [00:09<00:20, 639070.91it/s]\u001b[A\n",
      " 29%|██▊       | 5193728/18165135 [00:09<00:20, 642334.21it/s]\u001b[A\n",
      " 29%|██▉       | 5357568/18165135 [00:09<00:19, 643426.14it/s]\u001b[A\n",
      " 30%|███       | 5513216/18165135 [00:10<00:19, 638420.09it/s]\u001b[A\n",
      " 31%|███▏      | 5677056/18165135 [00:10<00:19, 642151.85it/s]\u001b[A\n",
      " 32%|███▏      | 5840896/18165135 [00:10<00:19, 645084.49it/s]\u001b[A\n",
      " 33%|███▎      | 6004736/18165135 [00:10<00:18, 644882.48it/s]\u001b[A\n",
      " 34%|███▍      | 6160384/18165135 [00:11<00:18, 638067.50it/s]\u001b[A\n",
      " 35%|███▍      | 6324224/18165135 [00:11<00:18, 641525.48it/s]\u001b[A\n",
      " 36%|███▌      | 6488064/18165135 [00:11<00:18, 644735.51it/s]\u001b[A\n",
      " 37%|███▋      | 6643712/18165135 [00:11<00:18, 637499.54it/s]\u001b[A\n",
      " 37%|███▋      | 6807552/18165135 [00:12<00:17, 641442.51it/s]\u001b[A\n",
      " 38%|███▊      | 6971392/18165135 [00:12<00:17, 644573.99it/s]\u001b[A\n",
      " 39%|███▉      | 7127040/18165135 [00:12<00:17, 637425.03it/s]\u001b[A\n",
      " 40%|████      | 7290880/18165135 [00:12<00:16, 641230.08it/s]\u001b[A\n",
      " 41%|████      | 7454720/18165135 [00:13<00:16, 644485.46it/s]\u001b[A\n",
      " 42%|████▏     | 7618560/18165135 [00:13<00:16, 646744.89it/s]\u001b[A\n",
      " 43%|████▎     | 7774208/18165135 [00:13<00:16, 638439.30it/s]\u001b[A\n",
      " 44%|████▎     | 7938048/18165135 [00:14<00:15, 642178.41it/s]\u001b[A\n",
      " 45%|████▍     | 8101888/18165135 [00:14<00:15, 645535.75it/s]\u001b[A\n",
      " 45%|████▌     | 8257536/18165135 [00:14<00:15, 638043.63it/s]\u001b[A\n",
      " 46%|████▋     | 8421376/18165135 [00:14<00:15, 641843.64it/s]\u001b[A\n",
      " 47%|████▋     | 8585216/18165135 [00:15<00:14, 644809.56it/s]\u001b[A\n",
      " 48%|████▊     | 8749056/18165135 [00:15<00:14, 646997.07it/s]\u001b[A\n",
      " 49%|████▉     | 8904704/18165135 [00:15<00:14, 638503.18it/s]\u001b[A\n",
      " 50%|████▉     | 9068544/18165135 [00:15<00:14, 642659.51it/s]\u001b[A\n",
      " 50%|█████     | 9150464/18165135 [00:15<00:16, 547457.43it/s]\u001b[A\n",
      " 51%|█████     | 9306112/18165135 [00:16<00:15, 566986.02it/s]\u001b[A\n",
      " 52%|█████▏    | 9469952/18165135 [00:16<00:14, 589659.88it/s]\u001b[A\n",
      " 53%|█████▎    | 9633792/18165135 [00:16<00:14, 606213.17it/s]\u001b[A\n",
      " 54%|█████▍    | 9789440/18165135 [00:16<00:13, 611549.05it/s]\u001b[A\n",
      " 55%|█████▍    | 9953280/18165135 [00:17<00:13, 622735.60it/s]\u001b[A\n",
      " 56%|█████▌    | 10117120/18165135 [00:17<00:12, 630070.74it/s]\u001b[A\n",
      " 57%|█████▋    | 10280960/18165135 [00:17<00:12, 636725.65it/s]\u001b[A\n",
      " 57%|█████▋    | 10436608/18165135 [00:17<00:12, 632693.16it/s]\u001b[A\n",
      " 58%|█████▊    | 10600448/18165135 [00:18<00:11, 637335.99it/s]\u001b[A\n",
      " 59%|█████▉    | 10764288/18165135 [00:18<00:11, 641744.33it/s]\u001b[A\n",
      " 60%|██████    | 10919936/18165135 [00:18<00:11, 636501.89it/s]\u001b[A\n",
      " 61%|██████    | 11083776/18165135 [00:18<00:11, 640141.93it/s]\u001b[A\n",
      " 62%|██████▏   | 11247616/18165135 [00:19<00:10, 643121.02it/s]\u001b[A\n",
      " 63%|██████▎   | 11411456/18165135 [00:19<00:10, 645877.34it/s]\u001b[A\n",
      " 64%|██████▎   | 11567104/18165135 [00:19<00:10, 638471.57it/s]\u001b[A\n",
      " 65%|██████▍   | 11730944/18165135 [00:19<00:10, 642066.62it/s]\u001b[A\n",
      " 65%|██████▌   | 11886592/18165135 [00:20<00:08, 779031.48it/s]\u001b[A\n",
      " 66%|██████▌   | 11984896/18165135 [00:20<00:09, 660269.33it/s]\u001b[A\n",
      " 66%|██████▋   | 12066816/18165135 [00:20<00:11, 553255.56it/s]\u001b[A\n",
      " 67%|██████▋   | 12214272/18165135 [00:20<00:10, 565680.40it/s]\u001b[A\n",
      " 68%|██████▊   | 12378112/18165135 [00:20<00:09, 588957.44it/s]\u001b[A\n",
      " 69%|██████▉   | 12533760/18165135 [00:21<00:09, 598173.99it/s]\u001b[A\n",
      " 70%|██████▉   | 12697600/18165135 [00:21<00:08, 612842.72it/s]\u001b[A\n",
      " 71%|███████   | 12861440/18165135 [00:21<00:08, 623990.55it/s]\u001b[A\n",
      " 72%|███████▏  | 13025280/18165135 [00:21<00:08, 631603.29it/s]\u001b[A\n",
      " 73%|███████▎  | 13180928/18165135 [00:22<00:07, 628381.78it/s]\u001b[A\n",
      " 73%|███████▎  | 13344768/18165135 [00:22<00:07, 635134.07it/s]\u001b[A\n",
      " 74%|███████▍  | 13508608/18165135 [00:22<00:07, 640089.83it/s]\u001b[A\n",
      " 75%|███████▌  | 13664256/18165135 [00:23<00:07, 634139.70it/s]\u001b[A\n",
      " 76%|███████▌  | 13828096/18165135 [00:23<00:06, 638748.18it/s]\u001b[A\n",
      " 77%|███████▋  | 13991936/18165135 [00:23<00:06, 642651.26it/s]\u001b[A\n",
      " 78%|███████▊  | 14155776/18165135 [00:23<00:06, 644455.71it/s]\u001b[A\n",
      " 79%|███████▉  | 14311424/18165135 [00:24<00:06, 637174.23it/s]\u001b[A\n",
      " 80%|███████▉  | 14475264/18165135 [00:24<00:05, 641236.16it/s]\u001b[A\n",
      " 81%|████████  | 14639104/18165135 [00:24<00:05, 644296.34it/s]\u001b[A\n",
      " 81%|████████▏ | 14794752/18165135 [00:24<00:05, 636592.93it/s]\u001b[A\n",
      " 82%|████████▏ | 14958592/18165135 [00:25<00:05, 640996.44it/s]\u001b[A\n",
      " 83%|████████▎ | 15122432/18165135 [00:25<00:04, 644078.92it/s]\u001b[A\n",
      " 84%|████████▍ | 15278080/18165135 [00:25<00:04, 636901.82it/s]\u001b[A\n",
      " 85%|████████▌ | 15441920/18165135 [00:25<00:04, 640779.58it/s]\u001b[A\n",
      " 86%|████████▌ | 15605760/18165135 [00:26<00:03, 644076.64it/s]\u001b[A\n",
      " 87%|████████▋ | 15769600/18165135 [00:26<00:03, 645957.88it/s]\u001b[A\n",
      " 88%|████████▊ | 15925248/18165135 [00:26<00:03, 638048.13it/s]\u001b[A\n",
      " 89%|████████▊ | 16089088/18165135 [00:26<00:03, 642185.48it/s]\u001b[A\n",
      " 89%|████████▉ | 16252928/18165135 [00:27<00:02, 645121.51it/s]\u001b[A\n",
      " 90%|█████████ | 16408576/18165135 [00:27<00:02, 636896.08it/s]\u001b[A\n",
      " 91%|█████████ | 16572416/18165135 [00:27<00:02, 640790.75it/s]\u001b[A\n",
      " 92%|█████████▏| 16736256/18165135 [00:27<00:02, 644053.03it/s]\u001b[A\n",
      " 93%|█████████▎| 16891904/18165135 [00:28<00:01, 636834.52it/s]\u001b[A\n",
      " 94%|█████████▍| 17055744/18165135 [00:28<00:01, 640681.54it/s]\u001b[A\n",
      " 95%|█████████▍| 17219584/18165135 [00:28<00:01, 644005.67it/s]\u001b[A\n",
      " 96%|█████████▌| 17383424/18165135 [00:28<00:01, 646347.14it/s]\u001b[A\n",
      " 97%|█████████▋| 17539072/18165135 [00:29<00:00, 637746.74it/s]\u001b[A\n",
      " 97%|█████████▋| 17702912/18165135 [00:29<00:00, 642148.82it/s]\u001b[A\n",
      " 98%|█████████▊| 17866752/18165135 [00:29<00:00, 644817.77it/s]\u001b[A\n",
      " 99%|█████████▉| 18022400/18165135 [00:29<00:00, 637370.60it/s]\u001b[A"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Extracting ./kmnist/KMNIST/raw/train-images-idx3-ubyte.gz\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "0it [00:00, ?it/s]\u001b[A\u001b[A"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Downloading http://codh.rois.ac.jp/kmnist/dataset/kmnist/train-labels-idx1-ubyte.gz to ./kmnist/KMNIST/raw/train-labels-idx1-ubyte.gz\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "  0%|          | 0/29497 [00:00<?, ?it/s]\u001b[A\u001b[A\n",
      "\n",
      "32768it [00:00, 38685.72it/s]            \u001b[A\u001b[A\n",
      "\n",
      "0it [00:00, ?it/s]\u001b[A\u001b[A"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Extracting ./kmnist/KMNIST/raw/train-labels-idx1-ubyte.gz\n",
      "Downloading http://codh.rois.ac.jp/kmnist/dataset/kmnist/t10k-images-idx3-ubyte.gz to ./kmnist/KMNIST/raw/t10k-images-idx3-ubyte.gz\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "  0%|          | 0/3041136 [00:06<?, ?it/s]\u001b[A\u001b[A\n",
      "\n",
      " 40%|███▉      | 1204224/3041136 [00:06<00:00, 12010466.40it/s]\u001b[A\u001b[A\n",
      "\n",
      " 78%|███████▊  | 2383872/3041136 [00:06<00:00, 11906036.96it/s]\u001b[A\u001b[A\n",
      "\n",
      "3047424it [00:06, 466399.54it/s]                               \u001b[A\u001b[A\n",
      "18169856it [00:42, 637370.60it/s]                              \u001b[A"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Extracting ./kmnist/KMNIST/raw/t10k-images-idx3-ubyte.gz\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "0it [00:00, ?it/s]\u001b[A\u001b[A"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Downloading http://codh.rois.ac.jp/kmnist/dataset/kmnist/t10k-labels-idx1-ubyte.gz to ./kmnist/KMNIST/raw/t10k-labels-idx1-ubyte.gz\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "  0%|          | 0/5120 [00:00<?, ?it/s]\u001b[A\u001b[A\n",
      "\n",
      "8192it [00:00, 11515.48it/s]            \u001b[A\u001b[A"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Extracting ./kmnist/KMNIST/raw/t10k-labels-idx1-ubyte.gz\n",
      "Processing...\n",
      "Done!\n"
     ]
    }
   ],
   "source": [
    "kmnist_loader = torch.utils.data.DataLoader(\n",
    "    datasets.KMNIST('./kmnist', train=False, download=True, transform=transforms.ToTensor()), batch_size=5, shuffle=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tensor([2, 9, 3, 8, 3])\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAABoCAYAAADo66t9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAcmklEQVR4nO2dedyUVRXHvyfcUjJRU1FMwHBPxchArUwhcINcQ03JJZfcP5iClmmmuaOWG4miZoq75JprZRbiviHuC4qo5Za2SN7+mPnNvTPvzPvOvO8sz9D5fj58mHnmvjN37nOfZ84953fOtRACjuM4TvvxmVZ3wHEcx+kefgN3HMdpU/wG7jiO06b4DdxxHKdN8Ru44zhOm+I3cMdxnDalRzdwMxtlZrPN7Hkzm1CvTjmO4zhdY93VgZtZL+BZYAQwB5gJ7BxCeLp+3XMcx3EqsVAP/nZD4PkQwosAZnYlMAaoeAM3M88achzHqZ13QghfKD3YExfKSsBryfM5+WNFmNk+ZvagmT3Yg89yHMf5f+aVcgd7YoFbmWMdLOwQwmRgMrgF7jiOU096YoHPAVZOnvcD3uhZdxzHcZxq6YkFPhMYZGYDgNeBscAu3X2zPfbYA4A//vGPALzwwgs96NqCzQorrADA+uuvD8Btt91Wse1SSy0FwGqrrQbAgw/mPFmffvppI7uYeX784x8DcPzxx1dso7m47777AvDMM88UXlt55Zzt8oUv5NySf//73wEwyy1MX3rppTr3uDJ9+vQBYOLEiQAMGzYMgI022qjQRud79uzZAIwZMwaI15n6nT6WwMEL3mWXbt/AQwjzzexA4HagF3BRCOGpuvXMcRzH6ZSeWOCEEG4BbqlTXxzHcZwa6NENvJ784Q9/AOCggw4C4IgjjgDgk08+aejn9u3bt/BYn/XOO++UbfvFL36x8Fgun48//hiAa6+9FoAXX3yxIf1M+epXvwrAnnvuCXTuQpGr4LDDDgPguuuuK/rbDz/8sGH9zCJLLLEEALvuumvR8X/961+Fx9/73vcAuP7664HoflhzzTULbX7zm98AcMoppxS1mTx5MgBDhgwptG20O/Czn/0sADvttBMASy+9NADnn39+oc1///tfAAYOHAjEub766qsDsd8Qv6dcRieeeCLQ+TxrN/r16wfAPvvsA8Buu+1WeG2hhXK3xaeffrqozSuvlBWCtBRPpXccx2lTup2J2a0Pq0JGOHjwYADWWGMNAK644oqG9GWbbbYB4JJLLikck5WyySabAPC3v/0NiNargoYA7733HgBf/vKXARgwYAAA48aNK7SRtVtvjjrqKCCuUmRNPvTQQwBsuOGGhbaXXXYZAEsuuWTRe2y88cYA3H///Q3pY9ZYfvnlAbjjjjsAWGuttQC4++67ATj99NMLbW+//faiv9V8uPjiiwvHbrkl5znU3Pj85z8PwHPPPQfACSecUGg7adKkOn2L8px55pkAHHLIIUA85/vtt1+hjQKTWin885//BGCRRRYB4K677iq01fcVjz76KABf+cpXit6jHVl88cUBuOmmmwD41re+1aGNvu/YsWMBePbZZ4GWB3MfCiEMKT3oFrjjOE6bkhkfuHjkkUcA2HHHHYH6WeCf+Uzut0o+4WWWWQaAjz76qNBGfrH77rsPgF69egFw4YUXArD99tsX2spnKpne888/DxT7Vhtlgb/2Wi4BVlafrAlZCKkkrJTHHnsMgHfffbchfcsSOucQpYBaMZ133nkAHHrooQD85z//6fD3Ov9nnHEGEOcHxJWbrFH5oTX26Sqo0UjueMABBwDRhz9ixIhCG8V1JCO98847AfjTn/4EwOc+97mK769xlLWexgvaBck+L7jgAgC+/vWvF73+xhsxhWXChFxdPkkus4xb4I7jOG1K5ixwoej4wgsvDPRcjaKEDf2q/vznPwfgG9/4RqGNLKxll10WiMoS+ZpTi26xxRYDoi/83nvvLTreSKZNmwbEeMH+++8PRCtipZViSZpFF10UgJkzZwIwfPhwAD744IOG97PVKHkJYpKLVleKI5SzvMXo0aOBOM5SeUBcKYq5c+cCMGPGDKA46afRSC3zta99DYhz+rTTTiu0UfLXOuusA8D3v/99AP7xj38AcbVRDs3tdrO8dR0DHHzwwUBclUhpItIYyO9///uaP0vjp1Vws+IEboE7juO0KX4DdxzHaVMy60KRzElLk+66UHbZJVeeRYEeScSU0KHgBsD8+fMBmDNnDgA//elPgRi8SSWHCiCOHz8eiEERBTwbiZb9+uyTTjoJiMu2J598stBW8rljjjkG+P9wnayyyioA/Pa3vy0cU+KN3GFyfZVDrrK99toLiAHqVF5YKinTc7kZlDDTDPTZDz/8MBCD3D/72c8KbRRkVeKZJLI33HADEKVyEAO8ktXefPPNDet7PVEAWUlUSrKCKJstdZ289dZbQLGMsiu5YBrw1TW41VZbAfDmm28C8Mtf/hKAe+65p9C2EUmJboE7juO0KZm1wJXIs9xyywHw6quvVv236623XuGx5HKlyRlK5JGcEOKvsWRYTz2Vq8218847A1HYn76vSgDIej/55JOr7mdPkaWgfu+www5AtLohWo//Dwk7Sla65pprgBhQhBjEqsYKUir6ZpttBsRUalmvnaH067XXXrtwrLS6X72Rdb3ddtsBMYGnd+/ehTY6/1dddRUQk300j5XYBHGFJwGBXutOcK8ZSMqr6/QnP/kJUHwdlEprFfD/9re/DcRrvTNWXHFFAE499dTCMX1m6fuPHD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OjXImsJSZqUhZ1sZ5DjAnhDAj//wacjf0rI7xcOClEMLbIYRPgOuAjcj2GEPl8czsdWhm44CtgV1D3v9ANvu7Krkf9Mfy114/4GEzW4EW9LdZN/CZwKB89H4RcoGJ6U367KowMwOmALNCCGckL00HxuUfjyPnG285IYSJIYR+IYT+5Mbz7hDCrsA9wA75ZpnpL0AI4U3gNTNbPX9oc+BpMjrG5FwnQ81s8fz8UH8zO8Z5Ko3ndGD3vFpiKPC+XC2txMxGAUcCo0MIHycvTQfGmtmiZjaAXHDwgVb0UYQQngghLBdC6J+/9uYAG+TndvPHt4mBgC3JRZhfAI5udiCiiv5tQm658zjwaP7fluT8yncBz+X/X7rVfS3T902Bm/KPB5Kb5M8DVwOLtrp/JX1dH3gwP843AH2yPMbAccAzwJPAZcCiWRpj4Apy/vlPyN1M9qo0nuSW+Ofkr8EnyKlrstDf58n5jnXdnZ+0Pzrf39nAFlnob8nrLxODmE0fX0+ldxzHaVM8E9NxHKdN8Ru44zhOm+I3cMdxnDbFb+CO4zhtit/AHcdx2hS/gTuO47QpfgN3HMdpU/4H0lgI+8ifclgAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "kmnist_sample, kmnist_target = iter(kmnist_loader).next()\n",
    "kmnist_sample = kmnist_sample.to(DEVICE)\n",
    "print(kmnist_target)\n",
    "# sns.set_style(\"dark\")\n",
    "show(make_grid(kmnist_sample.cpu()))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "torch.Size([5, 1, 28, 28])\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEU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tC7gHvpaR0zMJ1cbmYnNv1D8va2jht01ectwO800RKXA8/I1LKRMLMrgI8D7y+lvOBO3QJcZWbHm9kOBs7B/9kIGYVSyt2llDNLKdubsXcIeEvTtxdfvwt0BLyXgYd5P3DDoh0RY8j3ywzUnbuA7zR/72VgV74NeKD53LzRslZkfydwa/P/+Qw6+T7gX4HjN1q+IOsvALubev534LQ+1zHwp8B9wD3APwPH96mOgS8wsM+/xOBlck1XfTJQ8T/djMG7GUTX9EHefQxsxxp3f+uuv6GRdy9wZR/kDecP0DoxF16/uZQ+kUgklhS5EjORSCSWFPkCTyQSiSVFvsATiURiSZEv8EQikVhS5As8kUgklhT5Ak8kEoklRb7AE4lEYknx/3cv24HzgKvCAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "out = model(kmnist_sample)\n",
    "out = out.detach().cpu()\n",
    "out = out.view(-1, 1, 28,28)\n",
    "print(out.size())\n",
    "show(make_grid(out))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(28, 28)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAACT0AAAL+CAYAAABlzCJfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAewgAAHsIBbtB1PgAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nOzde5hkZ10n8O+vu+eWyUwSEnIhBBLAIIiAIlcBIYioIAgrrIgLuC7uA4rIAiLsPhKX9QIqeFtlUVZkWVgEFNYVFmQFQSAh4GVBrkK4SEJukJlc5tr97h9Vs6mMc+lJ5u2et+fzeZ5+nuqq09/3VFdX9XnrfM+paq0FAAAAAAAA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AAAAAooieAAAAAAAAAACAKKInAAAAAAAAAAAgiugJAAAAAAAAAACIInoCAAAAAAAAAACiiJ4AAAAAAAAAAIAooicAAAAAAAAAACDKM2lE6ueAmpW3AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 3000x1200 with 3 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = kmnist_sample[1,:,:,:]\n",
    "iters = 50\n",
    "dropout_p=0.1\n",
    "decay=1e-6\n",
    "l2 = 0.01\n",
    "\n",
    "y_mean, y_std = uncertainity_estimate_2d(x, model, iters, l2=l2, dropout_p=dropout_p,decay=decay)\n",
    "\n",
    "res_list = [x.cpu().view(28,28).numpy(), y_mean.view(28,28).numpy(), y_std.view(28,28).numpy()]\n",
    "print(res_list[0].shape)\n",
    "display_images(res_list, titles=['input','mean', 'std'], cols=len(res_list), interpolation=None, cmap=\"viridis\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
